#!/bin/sh

CURRENT_DIR=$(basename $PWD)

pnpm run build
# The apps-index package does not participate in secondary path planning.
# (apps-index 包不参与二级路径规划)
if [ "$CURRENT_DIR" = "apps-index" ];then
	sed "s/CURRENT_DIR\///g" luci_template > dist/index.htm
else
	sed "s/CURRENT_DIR/$CURRENT_DIR/g" luci_template > dist/index.htm
fi
cp -r public dist/static
